<template>
  <div class="user">
    <div class="search">
      <Hyform :formItems="formItems" v-model="formData">
        <template #header>
          <div>头部</div>
        </template>
        <template #footer>
          <div class="handle-btns">
            <el-button type="primary" icon="">重置</el-button>
            <el-button type="primary" icon="">搜索</el-button>
          </div>
        </template>
      </Hyform>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
import { useStore } from 'vuex'
import { Hyform } from '@/base-ui/form/index'
import { formItems } from './config/search.config'
export default defineComponent({
  name: 'user',
  components: { Hyform },
  setup() {
    const formData = ref({
      id: '',
      name: '',
      password: '',
      sport: '',
      createTime: '',
    })
    const store = useStore()
    store.dispatch('system/getPageListAction', {
      pageUrl: '/users/list',
      queryInfo: {
        offset: 0,
        size: 10,
      },
    })
    return { formItems, formData }
  },
})
</script>

<style scoped lang="less">
.el-row {
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.handle-btns {
  text-align: right;
  padding: 0 50px 20px 0;
}
</style>
